<ng-template #list>
  <nz-upload-list *ngIf="nzShowUploadList"
    [locale]="locale"
    [listType]="nzListType"
    [items]="nzFileList"
    [icons]="nzShowUploadList"
    [onPreview]="nzPreview"
    [onRemove]="onRemove"></nz-upload-list>
</ng-template>
<ng-template #con><ng-content></ng-content></ng-template>
<ng-template #btn>
  <div [ngClass]="classList" [style.display]="nzShowButton ? '' : 'none'">
    <div nz-upload-btn #upload [options]="_btnOptions">
      <ng-template [ngTemplateOutlet]="con"></ng-template>
    </div>
  </div>
</ng-template>
<ng-container *ngIf="nzType === 'drag'; else select">
  <div [ngClass]="classList"
    (drop)="fileDrop($event)"
    (dragover)="fileDrop($event)"
    (dragleave)="fileDrop($event)">
    <div nz-upload-btn #upload [options]="_btnOptions" [classes]="{'ant-upload-btn': true}">
      <div class="ant-upload-drag-container">
        <ng-template [ngTemplateOutlet]="con"></ng-template>
      </div>
    </div>
  </div>
  <ng-template [ngTemplateOutlet]="list"></ng-template>
</ng-container>
<ng-template #select>
  <ng-container *ngIf="nzListType === 'picture-card'; else pic">
    <ng-template [ngTemplateOutlet]="list"></ng-template>
    <ng-template [ngTemplateOutlet]="btn"></ng-template>
  </ng-container>
</ng-template>
<ng-template #pic>
  <ng-template [ngTemplateOutlet]="btn"></ng-template>
  <ng-template [ngTemplateOutlet]="list"></ng-template>
</ng-template>